<?php 
/**
 * This contoller is made by norman
 * mainly for control the shop bonus fomula
 * later the shop bonus structure changed
 * this contrller is not longer in good use 
 * @author Norman
 *
 */
class ShopsController extends Zend_Controller_Action
{

    public function indexAction(){
	
	}
	public function controlPanelAction(){
		
	}
	
	/**
	 * This page give simon ability to control and change 
	 * shop normal hour limits and trainning hour limits
	 */
	 
	public function shopHourLimitsAction(){
		
		$shops = new Model_DbTable_Shoplocation();
		$this->view->email = $this->_getParam("email");
		
		if($_POST){
			
			foreach($_POST['hour_limits'] as $key => $v){
				
				$shops->updateHourLimits($key, $v,$_POST['trainee_limits'][$key]);
			}
			
		}
		
			$sList = $shops->listAllActive();
			$this->view->sList = $sList;
	}

			
}
?>